<template>
  <div class="common-layout">
    <el-container>
      <el-aside :width="isCollapse ? '63px' : '200px'" class="aside">
        <Aside></Aside>
      </el-aside>
      <el-container>
        <el-header class="header">
          <Header></Header>
        </el-header>
        <el-main>
          <RouterView />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Aside from '../components/Aside.vue'
import Header from '../components/Header.vue'
export default {
  components: {
    Aside,
    Header
  },
  computed: {
    isCollapse() {
      return this.$store.state.collapse.isCollapse
    }
  }
}
</script>

<style lang="scss" scoped>
.common-layout {
  height: 100vh;
  // width: 100vw;
  // background-color: aqua;

  .aside {
    background-color: #555c64;
    height: 100vh;
    transition: all 0.5s;
  }

  .header {
    background-color: #7f8ea6;
  }

}
</style>